package com.company;

import java.util.Scanner;

public class Main29 {
    public static void main(String[] args) {
        int x,y,z;
        Scanner sr=new Scanner(System.in);
        System.out.println("输入一个数");
        x=sr.nextInt();



       for (int i=1;i<10000;i++){
          y= (int) Math.pow(2,i);
         if (y%x==1){
             System.out.println("2 ^"+i+ "mod "+x+" = 1");
             break;
         }
      }


    }
}

